# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-ati
pkgver=22.0.0
pkgrel=3
pkgdesc="ATI video driver"
url="https://xorg.freedesktop.org/wiki/"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
depends="mesa-dri-gallium"
makedepends="
	automake
	autoconf
	libtool
	util-macros
	libdrm-dev
	libxi-dev
	mesa-dev
	eudev-dev
	pixman-dev
	xorg-server-dev
	xorgproto
	"
options="!check" # No testsuite
source="https://xorg.freedesktop.org/archive/individual/driver/xf86-video-ati-$pkgver.tar.xz"

build() {
	export CFLAGS="${CFLAGS/-fno-plt}"
	export CXXFLAGS="${CXXFLAGS/-fno-plt}"
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-glamor
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
fba9ffc7b0eeb0c369eb1a6f8ef0bb3061cfeca26bc269baf6e3d16dcd943fbf4092f1e37adfb1bc71051cee0b7a0e6fb253f0b8bcd210732ccaf99e8f2356fe  xf86-video-ati-22.0.0.tar.xz
"
